package com.cheeven.cwliu.citation.steps;

import java.util.HashMap;
import org.w3c.dom.Document;

public class Step5 extends StepBase {

	public static void openWebOfSciencePage(HashMap<String, String> control) {
		logInfo("5. Open Web of Science page");

		logInfo(1, "Web of Science page is {0}", control.get("nextAction"));

		String nextAction = control.get("nextAction");

		String webOfSciencePage = httpGet(nextAction);
		Document domdoc = toDOM(webOfSciencePage);
		control.put("citationReportUrlString", "http://apps.webofknowledge.com" + xpath("//a[contains(text(),'Create Citation Report')]/@href", domdoc));

		logInfo(1, "Citation Report Page is {0}", control.get("citationReportUrlString"));

	}
}
